package com.hw.one.collect.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * @Class CommonRespData
 * @Author guoshenzhen
 * @Date 2018/3/16  16:53
 */
public class CommonData {
	private String time;
    private String deviceCode;
    @JsonIgnore
    private DataTypeEnum typeEnum;
    private List<Object> list;

    public CommonData(DataTypeEnum typeEnum) {
        this.typeEnum = typeEnum;
    }

    public CommonData getCommonData(Object obj){
        this.list = new ArrayList<>();
        this.list.add(obj);
        return this;
    }

    public List<Object> getList() {
        return list;
    }

    public void setList(List<Object> list) {
        this.list = list;
    }

    @JsonIgnore
    public DataTypeEnum getTypeEnum() {
        return typeEnum;
    }

    public void setTypeEnum(DataTypeEnum typeEnum) {
        this.typeEnum = typeEnum;
    }

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getDeviceCode() {
		return deviceCode;
	}

	public void setDeviceCode(String deviceCode) {
		this.deviceCode = deviceCode;
	}
}
